package cn.zhaoguang.usedcar.main.interceptor;

import cn.zhaoguang.usedcar.common.util.JwtTokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description
 * @Author zhaoguang
 * @Date 2021/3/8 2:27
 */
public class AuthenticationInterceptor extends HandlerInterceptorAdapter {

    @Autowired
    private JwtTokenUtil jwtTokenUtil;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
//        String token = request.getHeader("Authorization");
//        return jwtTokenUtil.validateToken(token);
        return true;
    }
}
